# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataproc.V1.Model.GkeNodePoolTarget do
  @moduledoc """
  GKE node pools that Dataproc workloads run on.

  ## Attributes

  *   `nodePool` (*type:* `String.t`, *default:* `nil`) - Required. The target GKE node pool. Format: 'projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{node_pool}'
  *   `nodePoolConfig` (*type:* `GoogleApi.Dataproc.V1.Model.GkeNodePoolConfig.t`, *default:* `nil`) - Input only. The configuration for the GKE node pool.If specified, Dataproc attempts to create a node pool with the specified shape. If one with the same name already exists, it is verified against all specified fields. If a field differs, the virtual cluster creation will fail.If omitted, any node pool with the specified name is used. If a node pool with the specified name does not exist, Dataproc create a node pool with default values.This is an input only field. It will not be returned by the API.
  *   `roles` (*type:* `list(String.t)`, *default:* `nil`) - Required. The roles associated with the GKE node pool.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :nodePool => String.t() | nil,
          :nodePoolConfig => GoogleApi.Dataproc.V1.Model.GkeNodePoolConfig.t() | nil,
          :roles => list(String.t()) | nil
        }

  field(:nodePool)
  field(:nodePoolConfig, as: GoogleApi.Dataproc.V1.Model.GkeNodePoolConfig)
  field(:roles, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Dataproc.V1.Model.GkeNodePoolTarget do
  def decode(value, options) do
    GoogleApi.Dataproc.V1.Model.GkeNodePoolTarget.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataproc.V1.Model.GkeNodePoolTarget do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
